import request from '../utils/request';
import { remoteAddress } from './ip';

export async function addTeacher(params) {
  return request(remoteAddress('/teacher/center/add'), {
    method: 'POST',
    body: {
      ...params,
    },
  });
}

export async function deleteTeacher(params) {
  return request(remoteAddress('/teacher/center/delete'), {
    method: 'POST',
    body: {
      ...params,
    },
  });
}

export async function editTeacher(params) {
  return request(remoteAddress('/teacher/center/update'), {
    method: 'POST',
    body: {
      ...params,
    },
  });
}

export async function queryTeacher(params) {
  return request(remoteAddress('/teacher/center/listall'), {
    method: 'POST',
    body: {
      ...params,
    },
  });
}

export async function editPassword(params) {
  return request(remoteAddress('/center/password/edit'), {
    method: 'POST',
    body: {
      ...params,
    },
  });
}
